<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="utf-8"/>
    <title></title>
    <link rel="stylesheet" th:href="@{/css/login.css}"/>
    <script th:src="@{/js/jquery.js}"></script>
    <script th:src="@{/js/login.js}"></script>
</head>

<body>
<div class="form">
    <div id="landing">登录</div>
    <div id="registered">注册</div>
    <div class="fix"></div>
    <div id="landing-content">
       <div id="photo"><img th:src="@{/img/photo.jpg}"/><br/><span style="color: red;" th:text="${msg}"></span></div>
        <form th:action="@{/user/login}" method="post">
            <div class="inp"><input type="text" name="userName" placeholder="用户名" ></div>
            <div class="inp"><input type="password" name="password" placeholder="密码" ></div>
            <div class="inp">
                <input type="text" class="code" id="code" name="loginCode" placeholder="验证码" >
                <img class="img" id="img" th:src="@{/user/verification}" onclick="changeImageCode()"/><!-- img:110*45 -->
                <script>
                    //更换验证码图片
                    function changeImageCode() {
                        //重新访问获得新的验证图片
                        document.getElementById("img").src = '[[@{/user/verification}]]?' + new Date().getTime();
                        //让对于的输入框获得焦点
                        document.getElementById("code").focus();
                    }
                </script>
            </div>
            <button type="submit" class="login">登录</button>
            <div id="bottom"><span id="registeredtxt">立即注册</span><span id="forgotpassword">忘记密码</span></div>
        </form>
    </div>
    <div id="registered-content">
        <form th:action="@{/user/registered}" method="post" enctype="multipart/form-data">
            <div class="inp"><input type="text" name="userName" placeholder="请输入用户名"/></div>
            <div class="inp"><input type="password" name="password" placeholder="请输入密码"/></div>
            <div class="inp"><input type="password" placeholder="请再次输入密码"/></div>
            <div class="inp"><input type="text" name="realName" placeholder="请输入真实姓名"/></div>
            <div class="inp">
                <span style="font-size: 13px;margin-left: 30px;">头像上传</span>
                <input type="file" name="img" placeholder="请上传头像" style="width: 70px;"/>
            </div>
            <button type="submit" class="login">立即注册</button>
        </form>
    </div>
</div>
</body>
</html>

		